<?php

$str = "Hello PHP Hello PHP";

$encoded = base64_encode($str);
var_dump($encoded);

$decoded = base64_decode($encoded);
var_dump($decoded);
